package com.hgxd.entity.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 设备表
 * </p>
 *
 * @author fsd
 * @since 2023-10-18
 */
@Data
@TableName("rb_equipment")
@ApiModel(value = "Equipment对象", description = "设备表")
public class Equipment implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("设备ID")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("设备名称")
    private String equipmentName;

    @ApiModelProperty("所属组织ID")
    private Integer organizationId;

    @ApiModelProperty("所属组织名称")
    private String organizationName;

    @ApiModelProperty("设备型号ID")
    private Integer equipmentTypeId;

    @ApiModelProperty("设备型号")
    private String equipmentType;

    @ApiModelProperty("设备状态：0:在线、1:离线")
    private Integer equipmentStatus;

    @ApiModelProperty("设备SN")
    private String equipmentSn;

    @ApiModelProperty("设备MAC码")
    private String equipmentMac;

    @ApiModelProperty("设备地址")
    private String equipmentAddress;

    @ApiModelProperty("启用状态：0:启用、1:未用")
    private Integer enabledStatus;

    @ApiModelProperty("标签")
    private String label;

    @ApiModelProperty("报警最小值")
    private String alarmMinValue;

    @ApiModelProperty("报警最大值")
    private String alarmMaxValue;

    @ApiModelProperty("报警状态：报警、未报警")
    private Integer alarmStatus;

    @ApiModelProperty("创建时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty("最后一次采集时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty("是否删除：0未删除，1已删除")
    @TableLogic
    private String isdelete;

    @TableField(exist = false)
    @ApiModelProperty("对应的孩子节点")
    private List children;


}
